<template>
  <van-cell class="comment-item" >
    <van-image
      slot="icon"
      class="avatar"
      round
      fit="cover"
      :src="comment.photo" />
    <div slot="title">
      <div class="title-wrap">
        <div class="name">{{ comment.user }}</div>
        <div class="like-wrap">
          <span class="pubdate" >{{ comment.time | formattingTime('YYYY/MM/DD') }}</span>
        </div>
      </div>
      <div class="content">{{ comment.message }}</div>
    </div>
  </van-cell>
</template>

<script>
export default {
  components: {},
  props: {
    comment: {
      type: Object,
      required: true
    }
  },
  data () {
    return {}
  },
  computed: {},
  watch: {},
  created () {},
  mounted () {},
  methods: {}
}
</script>

<style scoped lang="less">
.comment-item {
  .avatar {
    width: 36px;
    height: 36px;
    margin-right: 13px;
  }
  .name {
    font-size: 14px;
    color: #406599;
  }
  .content {
    font-size: 16px;
    color: #222222;
  }
  .pubdate {
    font-size: 10px;
    margin-right: 10px;
  }
  .title-wrap {
    display: flex;
    justify-content: space-between;
  }
  .like-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .like-icon.liked {
    color: #ff69b4;
  }
}
</style>
